#define _CRT_SECURE_NO_WARNINGS 1
#include <algorithm>
#include <iostream>
using namespace std;

int main()
{
    float a;
    char b;
    int ret = 0;
    cin >> a >> b;
    a = a - 1;
    ret += 20;
    if (a > 0)
    {
        if (a - (int)a > 0) ret += (int)a + 1;
        else ret += (int)a;
    }
    return (b == 'y' ? ret + 5 : ret);
}